import ContainerWidgets from '@/components/form-designer/form-widget/container-widget/index'
import ContainerItems from '@/components/form-render/container-item/index'
import VFormRender from '@/components/form-render/index' //渲染组件

import { loadExtension } from '@/extension/extension-loader' //扩展组件
import TableMultiLevelColumn from '@/components/form-designer/form-widget/table-multi-level-column'
import TableHighLevelColumn from '@/components/form-render/table-high-level-column'
import Draggable from 'vuedraggable'

export function useVForm(app) {
  app.use(ContainerWidgets)
  app.use(ContainerItems)
  app.component('VFormRender', VFormRender)
  app.component(TableMultiLevelColumn.name, TableMultiLevelColumn)
  app.component(TableHighLevelColumn.name, TableHighLevelColumn)
  app.component('draggable', Draggable)
  // widgetConfig.addAttrToSchemaWithName('basicFields', 'options.dataKey', '')
  loadExtension(app)
}
